#ifndef OBPILE_H
#define OBPILE_H

#include "ObStatic.h"
#include "ObPlayer.h"

class ObPipe : public ObStatic{
public:
	enum PIPE {Up = 30, Down, Left, Right, MidHor, MidVer};

	ObPipe();
	ObPipe(PIPE nid, int info);
	~ObPipe();

	bool setId(int nid);
	bool setInfo(int ninfo);
	static bool checkType(int obID);
	static bool checkInfo(int ninfo);

	void collidedWith(ObObject* object, CollisionRS rs);
	void update(float dt);
	void render(ID3DXSprite* mSprite);

	static bool loadTexture();
	static bool releaseTexture();

	int hasTree;
	int inside;
	int outside;
	bool isCreated;

private:
	static	IDirect3DTexture9* mTex;
	static	IDirect3DTexture9* mTreeTex;
	ObPipe* mMovingTo;
	ObPlayer* mPlayer;
};

#endif